Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade better-sqlite3 to v8.5.0 #536

Merged
merged 1 commit into from
Jul 23, 2023

Conversation

orangejulius
Copy link
Member

This helps with support for newer Node.js versions (pelias/pelias#950)

@missinglink
Copy link
Member

The CI is failing due to a lack of python3, not sure what changed here, maybe either the linux base image or our base image?

npm ERR! gyp ERR! find Python 
npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if "python3" can be used
npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python" can be used
npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
npm ERR! gyp ERR! find Python 
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python You need to install the latest version of Python.
npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm ERR! gyp ERR! find Python you can try one of the following options:
npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python   (accepted by both node-gyp and npm)
npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
npm ERR! gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python For more information consult the documentation at:
npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python 
npm ERR! gyp ERR! configure error 

@orangejulius
Copy link
Member Author

Yeah, there are no pre-built better-sqlite3 binaries for Node.js 12 (since it's EOL), so python3 is required to build it. But a while back we removed the compiler toolchain from our base images, and I'd rather keep it removed.

Once we update the Docker baseimage from Node.js 12 to Node.js 16, we should be fine.

@orangejulius orangejulius force-pushed the upgrade-better-sqlite3-to-8.4.0 branch from e030378 to 2faed3d Compare July 8, 2023 23:17
@orangejulius
Copy link
Member Author

Our Docker images are now built using Node.js 16, but the Docker build still fails because apparently better-sqlite3 version 8.4.0 also requires Ubuntu 20+. So we have to handle pelias/pelias#951 before merging this.

@orangejulius orangejulius force-pushed the upgrade-better-sqlite3-to-8.4.0 branch from 2faed3d to ec9d582 Compare July 14, 2023 21:46
@orangejulius orangejulius force-pushed the upgrade-better-sqlite3-to-8.4.0 branch from ec9d582 to f05d22b Compare July 23, 2023 19:27
This helps with support for newer Node.js versions
(pelias/pelias#950)
@orangejulius orangejulius force-pushed the upgrade-better-sqlite3-to-8.4.0 branch from f05d22b to 8c976ed Compare July 23, 2023 19:29
@orangejulius orangejulius changed the title Upgrade better-sqlite3 to v8.4.0 Upgrade better-sqlite3 to v8.5.0 Jul 23, 2023
@orangejulius
Copy link
Member Author

Everything Ubuntu 22 related is taken care of, so this PR can now be merged and we can start to update better-sqlite3 everywhere else. Hopefully this makes it quick and easy for everyone on modern operating systems and Node.js versions to run npm install as they won't have to compile better-sqlite3 and can instead rely on prebuilds.

Also, better-sqlite3 8.5.0 was just released so I've bumped up the version in this PR.

@orangejulius orangejulius merged commit 81e8de0 into master Jul 23, 2023
6 checks passed
@orangejulius orangejulius deleted the upgrade-better-sqlite3-to-8.4.0 branch July 23, 2023 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants